import { Outlet, useNavigate } from "react-router-dom";
import { Button, } from "antd-mobile";

const Home = () => {
  const usenavigate = useNavigate();

  function getAbout() {
    usenavigate("/about", { replace: true });
  }

  function getLogin() {
    usenavigate("/login", { replace: true });
  }

  return (
    <div className="home">
      <div className="table">
        <Button color='primary' onClick={getAbout}>跳转about</Button>
        <Button color='primary' onClick={getLogin}>跳转login</Button>
      </div>
      <div className="helo">
        <Outlet />
      </div>
    </div>
  );
};

export default Home;
